#pragma once


// CFontBox

class CFontBox : public CComboBox
{
	DECLARE_DYNAMIC(CFontBox)
public:
	void IgnoreVerticalFonts(bool ignore);
	LOGFONT& GetFont();

private:
	static CArray<LOGFONT> fonts;
	static bool initialized;
	bool ignoreVert;
	bool inserted;
	int selected; 
	
	static int CALLBACK EnumFontCallBack(ENUMLOGFONT FAR *lpelf, NEWTEXTMETRIC FAR *lpntm, 
							 int FontType, LPARAM lParam);
	void InitFonts();
	void InsertFonts();

public:
	CFontBox(bool ignoreVert = true);
	virtual ~CFontBox();

protected:
	DECLARE_MESSAGE_MAP()
public:
	virtual void DrawItem(LPDRAWITEMSTRUCT /*lpDrawItemStruct*/);
	afx_msg void OnCbnDropdown();
	virtual void MeasureItem(LPMEASUREITEMSTRUCT /*lpMeasureItemStruct*/);
};


